Skip to main content

How to Evaluate Agents

Guide · about 8 min · refs checked 2026-11-03 (reference links and dates only)

Agent success is not only the final answer: whether tools were chosen correctly, arguments were right, how many steps it took and what it cost all belong in the eval.

How to
Define task success first: not "a plausible answer" but "goal achieved + correct tool calls + no overreach". Record the full trajectory: messages, tool calls, arguments, return values, steps, latency and tokens; without it you cannot attribute failure. Score four things separately: final answer, tool choice, argument correctness and process efficiency (steps and cost). Across repeated runs, record success rate and failure types. pass@k concerns at least one success, not success every time. For repeatability, explicitly report an all-k-success metric. Calculate input, output and tool charges for each call, then sum steps and retries. Do not multiply already aggregated tokens by the step count again. Build a regression set: put production failures into a fixed question set and rerun after every model or prompt change.

Example and interpretation

A teaching scenario, not a measured or executed site test.

An agent succeeding once in five attempts has demonstrated a success, not repeatable reliability. Record completion, failing step and cost for every run. Distinguish at-least-one-success from all-attempts-success metrics.

How to check your practice

Explain the example in your own words, inspect input constraints, then verify against the source. Revisit concepts if you cannot explain why; supply missing dates, fields or permissions; withdraw unsupported conclusions.

For this topic, start with unchecked output · See all six scenarios and their reasoning

Sources
  • OpenAI Working with Evals ↗
  • LangSmith Evaluation ↗
  • AgentBench: Evaluating LLMs as Agents ↗
  • τ-bench paper (repeatability metrics, checked 2026-11-04) ↗